// 客户贡献分析
layui.use(['form','jquery','table','layer'],function() {
    let form = layui.form,
        $ = layui.jquery,
        table = layui.table,
        layer = layui.layer;

    let tabInstance = table.render({
        elem: '#CustomerContributionList',
        url: '/Statistical-Report/CustomerContribution', //数据接口
        page: true, //开启分页
        limit:5, //每页显示的条数，默认10
        limits:[2,5,10,15,], //每页显示条数选择框数据
        request:{
            pageName: 'current',
            limitName: 'size'
        },
        cols: [[ //表头
            {field: 'customerId', title: '编号', width:80, sort: true, fixed: 'left'},
            {field: 'customerName', title: '客户名称'},
            {field: 'sum', title: '订单金额'},
        ]]
    });

    form.on('submit(search)',function(data){
        tabInstance.reload({
            where: data.field
        });
    })
});